#ifndef __RobotI_H__
#define __RobotI_H__

#include <Robots.h>

#include <Ice/Ice.h>
#include <IceUtil/Mutex.h>

using namespace std;

class RobotI: public Robots::Robot
{
 public:
  RobotI (string address);
  ~RobotI();
  
  virtual void move (const ::Robots::RobotPos&,
		     const Ice::Current&);

  virtual void stop (const Ice::Current&);

  virtual void turn (Robots::Direction, 
		     Ice::Int, 
		     const Ice::Current&);

  virtual Ice::ByteSeq capture (Robots::Resolution, 
				const ::Ice::Current&);

  virtual void setLaser (bool, 
			 const Ice::Current&);

  virtual void destroy (const Ice::Current&);

  virtual bool isZombie ();

 private:
  string _address;
  IceUtil::Mutex _m;
  bool _destroyed;
};

typedef IceUtil::Handle<RobotI> RobotIPtr;

#endif
